Optimal. Leaf size=40 \[ \frac {2 \cos (c+d x)}{a^2 d (\sin (c+d x)+1)}-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {2874, 2966, 3770, 2648} \[ \frac {2 \cos (c+d x)}{a^2 d (\sin (c+d x)+1)}-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2648
Rule 2874
Rule 2966
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \frac {\csc (c+d x) (a-a \sin (c+d x))}{a+a \sin (c+d x)} \, dx}{a^2}\\ &=\frac {\int \left (\csc (c+d x)-\frac {2}{1+\sin (c+d x)}\right ) \, dx}{a^2}\\ &=\frac {\int \csc (c+d x) \, dx}{a^2}-\frac {2 \int \frac {1}{1+\sin (c+d x)} \, dx}{a^2}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {2 \cos (c+d x)}{a^2 d (1+\sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.16, size = 115, normalized size = 2.88 \[ -\frac {\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^3 \left (\cos \left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\sin \left (\frac {1}{2} (c+d x)\right ) \left (-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+4\right )\right )}{a^2 d (\sin (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.51, size = 103, normalized size = 2.58 \[ -\frac {{\left (\cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 4 \, \cos \left (d x + c\right ) + 4 \, \sin \left (d x + c\right ) - 4}{2 \, {\left (a^{2} d \cos \left (d x + c\right ) + a^{2} d \sin \left (d x + c\right ) + a^{2} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 38, normalized size = 0.95 \[ \frac {\frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {4}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.59, size = 40, normalized size = 1.00 \[ \frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}+\frac {4}{d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 55, normalized size = 1.38 \[ \frac {\frac {4}{a^{2} + \frac {a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}} + \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.68, size = 39, normalized size = 0.98 \[ \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}+\frac {4}{a^2\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cos ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________